package com.appcenter.application;

//import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import tk.mybatis.spring.annotation.MapperScan;

//开启事务注解
//@EnableTransactionManagement
//主要
@SpringBootApplication
//注入Mapper
@MapperScan("com.appcenter.application.mapper")
//Swagger2注解
@EnableSwagger2
@EnableScheduling
//@EnableCaching
//public class Application extends SpringBootServletInitializer {
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
    // 继承SpringBootServletInitializer 实现configure 方便打war 外部服务器部署。
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//        return application.sources(Application.class);
//    }
}
